<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			.div1{
				position: absolute;
				width: 200px;
				height: 200px;
				top: 50px;
				left: 10px;
				background: red;
			}
		</style>
	</head>
	<body>
		<button id="btn1">瞬间显示</button>
		<button id="btn2">慢慢显示</button>
		<button id="btn3">慢慢隐藏</button>
		<button id="btn4">显示隐藏切换</button>
		
		<div class="div1"></div>
		
		<script type="text/javascript" src="js/jquery-1.12.4.js" ></script>
		<script>
			/*			
			显示隐藏
			1. show(): (不)带动画的显示
			2. hide(): (不)带动画的隐藏
			3. toggle(): (不)带动画的切换显示/隐藏
			*/
			$(function(){
				$("#btn1").click(function(){
					$(".div1").show()
				})
				$("#btn2").click(function(){
					$(".div1").show(1000)
				})
				$("#btn3").click(function(){
					$(".div1").hide(500)
				})
				$("#btn4").click(function(){
					$(".div1").toggle(500)
				})
			})
		</script>
	</body>
</html>
